<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{ config('app.name', 'Laravel') }}</title>
    <link rel="stylesheet" href="{{ asset('static/layui/css/layui.css') }}">
    <link rel="stylesheet" href="{{ asset('static/admin/css/login.css') }}">
    <link rel="stylesheet" href="{{ asset('static/admin/css/fonts.css') }}">
</head>
<body>
<div class="login">
    <h1>网站后台管理系统</h1>
    <form action="{{route('admin.login')}}" method="post">
        <div class="layui-form-item">
            <i class="fa fa-user"></i>
            <input type="text" name="username" lay-verify="required" autocomplete="off" placeholder="请输入账号" class="layui-input layui-input-lg">
        </div>
        <div class="layui-form-item">
            <i class="fa fa-lock"></i>
            <input type="password" name="password" lay-verify="required" autocomplete="off" placeholder="请输入密码" class="layui-input layui-input-lg">
        </div>
        <div class="layui-form-item captcha">
            <i class="fa fa-shield"></i>
            <input type="text" name="captcha"  autocomplete="off" placeholder="验证码" class="layui-input layui-input-lg">
            <img src="/admin/index/captcha.html" onclick="this.src='/admin/index/captcha.html?rand='+Math.random()" />
        </div>
        {{csrf_field()}}
        <button class="layui-btn layui-btn-lg" lay-submit="" lay-filter="login">登 录</button>
    </form>
    <div class="copyright"><a href="http://www.openbms.cn" target="_blank">Powered By SkyTeam</a></div>
</div>
<script src="{{ asset('static/layui/layui.js') }}"></script>
<script>
layui.use(['layer', 'form', 'jquery'], function(){
    var layer = layui.layer,
        form  = layui.form,
        $     = layui.jquery;
    //表单提示信息
    @if(count($errors)>0)
        @foreach($errors->all() as $error)
        layer.msg("{{$error}}",{icon:5});
    @break
    @endforeach
    @endif

    //正确提示
    @if(session('success'))
layer.msg("{{session('success')}}",{icon:6});
    @endif


});
</script>
</body>
</html>